/**
 * 
 */
package com.thor.palmmall.rest.tenant.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.tenant.ALogo;
import com.thor.palmmall.spi.tenant.SLogo;

/**
 * @author NuoSa
 *
 * @since 1.0
 */
public class ALogosConverter implements Converter<SLogo, ALogo> {
  public static ALogosConverter getInstance() {
    if (instance == null)
      instance = new ALogosConverter();
    return instance;
  }

  private static ALogosConverter instance;

  private ALogosConverter() {
  }

  @Override
  public ALogo convert(SLogo source) {
    if (source == null) {
      return null;
    }
    ALogo target = new ALogo();
    target.setCaption(source.getCaption());
    target.setId(source.getId());
    target.setName(source.getName());
    return target;
  }

}
